@file:Suppress("NAME_SHADOWING")

package top.fzqblog.mutlideclare

/**
 * Created by 抽离 on 2017/8/3 0003.
 */

data class Mutil(val id:Int, val name:String){

    operator fun iterator():Iterable<Int> = MutilIterator()

}

class MutilIterator<T> : Iterable<T>{
    override fun iterator(): Iterator<T> {
        return this.iterator()
    }

}

fun main(args: Array<String>) {
    val mutil = Mutil(1, "啦啦")

    println("mutil：" + mutil)

    val(id, name) = mutil

    println("id：" + id)

    println("name：" + name)


}




